package zjh_20230328;

public interface Actor {
    void sing(double money);
    void dance(double money);

    class Kun implements Actor{

        @Override
        public void sing(double money) {
            System.out.println("Kun唱歌收入："+money);
        }

        @Override
        public void dance(double money) {
            System.out.println("Kun跳舞收入：" + money);
        }
    }
    class Agent implements Actor{
        private Actor actor;
        public Agent(Actor actor){
            this.actor = actor;
        }

        @Override
        public void sing(double money) {
            System.out.println("我是Kun的代理，sing找我");
            this.actor.sing(money * 0.5);
        }

        @Override
        public void dance(double money) {
            System.out.println("我是Kun的代理，dance找我");
            this.actor.dance(money * 0.7);
        }
    }

}
